Learn the structure of a Bayesian network with the Max-Min Hill Climbing (MMHC) and the more general 2-phase Restricted Maximization (RSMAX2) hybrid algorithms.
rsmax2(x, whitelist = NULL, blacklist = NULL, restrict, maximize = "hc",
test = NULL, score = NULL, alpha = 0.05, B = NULL, ...,
maximize.args = list(), optimized = TRUE, strict = FALSE, debug = FALSE)
mmhc(x, whitelist = NULL, blacklist = NULL, test = NULL, score = NULL,
alpha = 0.05, B = NULL, ..., restart = 0, perturb = 1, max.iter = Inf,
optimized = TRUE, strict = FALSE, debug = FALSE)
a data frame containing the variables in the model.
a data frame with two columns (optionally labeled "from" and "to"), containing a set of arcs to be included in the graph.
a data frame with two columns (optionally labeled "from" and "to"), containing a set of arcs not to be included in the graph.
a character string, the constraint-based algorithm to be used
in the “restrict” phase. Possible values are gs
, iamb
,
fast.iamb
, inter.iamb
and mmpc
. See
bnlearn-package
and the documentation of each algorithm for
details.
a character string, the score-based algorithm to be used in
the “maximize” phase. Possible values are hc
and tabu
.
See bnlearn-package
for details.
a character string, the label of the conditional independence test
to be used by the constraint-based algorithm. If none is specified, the
default test statistic is the mutual information for categorical
variables, the Jonckheere-Terpstra test for ordered factors and the
linear correlation for continuous variables. See
bnlearn-package
for details.
a character string, the label of the network score to be used in
the score-based algorithm. If none is specified, the default score is the
Bayesian Information Criterion for both discrete and continuous data
sets. See bnlearn-package
for details.
a numeric value, the target nominal type I error rate of the conditional independence test.
a positive integer, the number of permutations considered for each
permutation test. It will be ignored with a warning if the conditional
independence test specified by the test
argument is not a permutation
test.
additional tuning parameters for the network score used by the
score-based algorithm. See score
for details.
a list of arguments to be passed to the score-based
algorithm specified by maximize
, such as restart
for
hill-climbing or tabu
for tabu search.
an integer, the number of random restarts for the score-based algorithm.
an integer, the number of attempts to randomly insert/remove/reverse an arc on every random restart.
an integer, the maximum number of iterations for the score-based algorithm.
a boolean value. If TRUE
a lot of debugging output is
printed; otherwise the function is completely silent.
a boolean value. See bnlearn-package
for
details.
a boolean value. If TRUE
conflicting results in the
learning process generate an error; otherwise they result in a warning.
An object of class bn
. See bn-class
for details.
Tsamardinos I, Brown LE, Aliferis CF (2006). "The Max-Min Hill-Climbing Bayesian Network Structure Learning Algorithm". Machine Learning, 65(1), 31-78.
local discovery algorithms, score-based algorithms, constraint-based algorithms.